<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>师生一体化教考通系统</title>
    <!-- Font Awesome for icons -->
    <link rel="stylesheet"
          href="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/font-awesome/4.7.0/css/font-awesome.min.css">
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="/static/css/bootstrap.css">
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
        }

        .box {
            -webkit-text-size-adjust: 100%;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
            font-size: 14px;
            line-height: 1.42857143;
            color: #333333;
            font-family: Arial, sans-serif;
            box-sizing: border-box;
            padding: 20px;
            background-color: #fff;
            border-radius: 4px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            margin: auto;
        }

        .navbar {
            background-color: #337ab7;
            margin-bottom: 20px;
            border-radius: 0;
        }

        .navbar .navbar-brand,
        .navbar .nav > li > a {
            color: #fff;
        }

        .navbar .navbar-brand {
            font-size: 24px;
        }

        .navbar .nav > li > a:hover,
        .navbar .nav > li > a:focus {
            background-color: #286090;
        }

        .navbar .user-name {
            color: #fff;
            font-size: 18px;
            margin-top: 8px;
        }

        .form-inline .form-group {
            margin-right: 10px;
        }

        .form-inline .btn {
            margin-left: 10px;
        }

    </style>
</head>
<body>
<!-- Navigation Bar -->
<nav class="navbar navbar-default">
    <div class="container-fluid">
        <div class="navbar-header">
            <a class="navbar-brand" href="#"><i class="fa fa-desktop"></i> 师生一体化教考通系统</a>
        </div>
        <ul class="nav navbar-nav">
            <li class="active"><a href="{% url 'stu_information_tea' %}">学生信息</a></li>
            <li><a href="{% url 'test_information_tea' %}">考试信息</a></li>
            <li><a href="{% url 'work_information_tea' %}">作业信息</a></li>
            <li><a href="{% url 'course_information_tea' %}">课程管理</a></li>
        </ul>
        <ul class="nav navbar-nav navbar-right">
            <li><a href="#"><i class="fa fa-user"></i> {{ user }}</a></li>
            <li><a href="{% url 'load' %}">切换账号</a></li>
        </ul>
    </div>
</nav>
<!-- Error message display -->
{% if errormessage %}
    <div class="alert alert-danger" role="alert" style="margin: 20px;">
        {{ errormessage }}
    </div>
{% endif %}

<!-- Success message display -->
{% if success %}
    <div class="alert alert-success" role="alert" style="margin: 20px;">
        {{ success }}
    </div>
{% endif %}

<div class="modal-body">
    <div class="box" style="width: 70% ;height: 500px">
        <form id="editForm" novalidate method="post" action={% url 'stu_add' %}>
            {% csrf_token %}
            {% for filed in form %}
                <div class="form-group">
                    <label>{{ filed.label }}</label>
                    <span style="color: red"> {{ filed }}{{ filed.errors.0 }}</span>
                </div>
            {% endfor %}

            <button type="submit" class="btn btn-primary">保存学生信息</button>
            <span style="color: #5cb85c">{{ success }}</span>
        </form>
        <form method="get" class="container" style="position: absolute;left: 45%;" action={% url 'stu_information_tea' %}>
            <button type="submit" class="btn btn-success" style="width: 200px;height: 40px; font-size: 26px">返回</button>
        </form>
    </div>

</div>
<!-- Bootstrap JS (optional, for Bootstrap's JavaScript plugins) -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>

</body>
</html>
